package com.msgqer.rchat.event;

/**
 * 通讯的事件
 * 
 * @author keaizhuzhu@公众号：面试怪圈 ;官网地址：{@link http://www.mianshiguaiquan.com}
 *         这里有更多面试、技术、学习资料及源码等
 *
 */
public class CommunicationEvent<T> {

	public CommunicationEvent(Integer type, T data) {
		super();
		this.type = type;
		this.data = data;
	}

	/**
	 * 通讯事件类型
	 * 
	 * @see EnumCommunicationEventType
	 */
	private Integer type;
	/**
	 * 不同类型有不同的数据
	 */
	private T data;

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "CommunicationEvent [type=" + type + ", data=" + data + "]";
	}
	
	
	
	

}
